package com.bang.itstack.day18.impl;

import com.bang.itstack.day18.LotteryResult;
import com.bang.itstack.day18.LotteryService;
import com.bang.itstack.day18.MinibusTargetService;

import java.util.Date;

/**
 * @ClassName: LotteryServiceImpl
 * @Desc: TODO
 * @author: <Bang>
 * @Date: 2021/10/23 18:28
 * @Version: 1.0
 * @Modified By:
 */
public class LotteryServiceImpl extends LotteryService {

    private MinibusTargetService minibusTargetService = new MinibusTargetService();

    @Override
    protected LotteryResult doDraw(String uId) {
        // 摇号
        String lottery = minibusTargetService.lottery(uId);
        // 结果
        return new LotteryResult(uId, lottery, new Date());
    }
}
